<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:87:"E:\phpStudy20161103\WWW\tpAdmin-master\public/../application/admin\view\batch\edit.html";i:1491036934;s:90:"E:\phpStudy20161103\WWW\tpAdmin-master\public/../application/admin\view\template\base.html";i:1488899632;s:101:"E:\phpStudy20161103\WWW\tpAdmin-master\public/../application/admin\view\template\javascript_vars.html";i:1488899632;}*/ ?>
﻿<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <title><?php echo \think\Config::get('site.title'); ?></title>
    <link rel="Bookmark" href="__ROOT__/favicon.ico" >
    <link rel="Shortcut Icon" href="__ROOT__/favicon.ico" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="__LIB__/html5.js"></script>
    <script type="text/javascript" src="__LIB__/respond.min.js"></script>
    <script type="text/javascript" src="__LIB__/PIE_IE678.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="__STATIC__/h-ui/css/H-ui.min.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/h-ui.admin/css/H-ui.admin.css"/>
    <link rel="stylesheet" type="text/css" href="__LIB__/Hui-iconfont/1.0.7/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="__LIB__/icheck/icheck.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/h-ui.admin/skin/default/skin.css" id="skin"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/h-ui.admin/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/app.css"/>
    <link rel="stylesheet" type="text/css" href="__LIB__/icheck/icheck.css"/>
    
    <!--[if IE 6]>
    <script type="text/javascript" src="__LIB__/DD_belatedPNG_0.0.8a-min.js"></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <!--定义JavaScript常量-->
<script>
    window.THINK_ROOT = '<?php echo \think\Request::instance()->root(); ?>';
    window.THINK_MODULE = '<?php echo \think\Url::build("/" . \think\Request::instance()->module(), "", false); ?>';
    window.THINK_CONTROLLER = '<?php echo \think\Url::build("___", "", false); ?>'.replace('/___', '');
</script>
</head>
<body>

<nav class="breadcrumb">
    <div id="nav-title"></div>
    <a class="btn btn-success radius r btn-refresh" style="line-height:1.6em;margin-top:3px" href="javascript:;" title="刷新"><i class="Hui-iconfont"></i></a>
</nav>


<div class="page-container">
    <form class="form form-horizontal" id="form" method="post" action="<?php echo \think\Request::instance()->baseUrl(); ?>">
        <input type="hidden" name="id" value="<?php echo isset($vo['id']) ? $vo['id'] :  ''; ?>">

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">优惠码段：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="number" class="input-text start_num" placeholder="起始号码" name="start_num" value="<?php echo isset($start_num) ? $start_num :  '123456'; ?>" readonly/> --
                <input type="number" class="input-text end_num" placeholder="结束号码" name="end_num" value="<?php echo isset($end_num) ? $end_num :  '123456'; ?>" readonly/>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">批次号：</label>
            <div class="formControls col-xs-3 col-sm-3">
                <input type="text" class="input-text batch" placeholder="批次号" name="batch" value="<?php echo $batch; ?>" readonly/>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>有效期：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="number" class="input-text" placeholder="有效期" name="expiry" value="<?php echo isset($expiry) ? $expiry :  '3'; ?>"  datatype="*" nullmsg="请填写有效期" readonly/> 个月
            </div>

        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>客户优惠类型：</label>
            <div class="formControls col-xs-6 col-sm-6 skin-minimal" >
                <div class="radio-box" nullmsg="请选择客户优惠类型">
                    <input type="radio" name="company_type" id="company_type-0" value="1" datatype="*" nullmsg="请选择客户优惠类型">折扣优惠
                    <label for="company_type-0"></label>
                </div>
                <div class="radio-box">
                    <input type="radio" name="company_type" id="company_type-1" value="2" datatype="*" nullmsg="请选择客户优惠类型">固定金额
                    <label for="company_type-1"></label>
                </div>
            </div>

        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>客户优惠值：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="number" class="input-text" placeholder="优惠值" name="company_value" value="<?php echo isset($vo['company_value']) ? $vo['company_value'] :  ''; ?>"  datatype="*" nullmsg="请填写客户优惠值" readonly/>
                <span class="company_value"></span>
            </div>

        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>快递员收益类型：</label>
            <div class="formControls col-xs-6 col-sm-6 skin-minimal">
                <div class="radio-box">
                    <input type="radio" name="offline_type" id="offline_type-0" value="1" datatype="*" nullmsg="请选择快递优惠类型">折扣收益
                    <label for="offline_type-0"></label>
                </div>
                <div class="radio-box">
                    <input type="radio" name="offline_type" id="offline_type-1" value="2" datatype="*" nullmsg="请选择快递优惠类型">固定金额收益
                    <label for="offline_type-1"></label>
                </div>
            </div>

        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>快递收益值：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="number" class="input-text offline_value" placeholder="快递收益" name="offline_value" value="<?php echo isset($vo['offline_value']) ? $vo['offline_value'] :  ''; ?>"  datatype="*" nullmsg="请填写快递员收益值" readonly/>
                <span class="offline_value"></span>
            </div>

        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">备注：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <textarea class="textarea" placeholder="" name="remark" onKeyUp="textarealength(this,100)"><?php echo isset($vo['remark']) ? $vo['remark'] :  ''; ?></textarea>
                <p class="textarea-numberbar"><em class="textarea-length">0</em>/100</p>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>

        <!--<div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <button type="submit" class="btn btn-primary radius">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>
                <button type="button" class="btn btn-default radius ml-20" onClick="layer_close();">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </div>-->
    </form>
</div>

<script type="text/javascript" src="__LIB__/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="__LIB__/layer/2.4/layer.js"></script>
<script type="text/javascript" src="__STATIC__/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="__STATIC__/h-ui.admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="__STATIC__/js/app.js"></script>
<script type="text/javascript" src="__LIB__/icheck/jquery.icheck.min.js"></script>

<script type="text/javascript" src="__LIB__/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="__LIB__/My97DatePicker/WdatePicker.js"></script>
<script>
    $(function () {
        $("[name='company_type'][value='<?php echo isset($vo['company_type']) ? $vo['company_type'] :  ''; ?>']").prop("checked", true);
        $("[name='offline_type'][value='<?php echo isset($vo['offline_type']) ? $vo['offline_type'] :  ''; ?>']").prop("checked", true);

        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });

        $("#form").Validform({
            tiptype: 2,
            ajaxPost: true,
            showAllError: true,
            callback: function (ret){
                ajax_progress(ret);
            }
        });

        //取卡数失焦时  计算号码段
        $('.num').blur(function(){
            var num = $('.num').val();
            var start_num = $('.start_num').val();
            var new_num = Number(num) + Number(start_num) - 1;
            var end_num = $('.end_num').val(new_num);
        });


        //选择客户优惠类型时  显示对应优惠值
        $('#company_type-0').click(function(){
            $('.company_value').empty().append('折');
        });
        $('#company_type-1').click(function(){
            $('.company_value').empty().append('元');
        });

        //选择快递收益类型时  显示对应收益值
        $('#offline_type-0').click(function(){
            $('.offline_value').empty().append('折');
        });
        $('#offline_type-1').click(function(){
            $('.offline_value').empty().append('元');
        });

    })
</script>

</body>
</html>